<script>
	export default {
		globalData: {
			windowWidth: 0,
			windowHeight: 0
		},
		onLaunch() {
			console.log('App Launch')

			// 仅在非手机端执行
			//#ifndef APP-PLUS || H5 || MP-WEIXIN
			console.log('非手机端');
			//#endif

			// 仅在手机端执行
			//#ifdef APP-PLUS || H5 || MP-WEIXIN
			console.log('手机端');
			const systemInfo = uni.getSystemInfoSync();
			this.globalData.windowWidth = systemInfo.screenWidth;
			this.globalData.windowHeight = systemInfo.screenHeight;
			console.log('屏幕宽度:', this.globalData.windowWidth, this.globalData);
			console.log('屏幕高度:', this.globalData.windowHeight);
			//#endif
		},
		onShow() {
			console.log('App Show')
		},
		onHide() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	* {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	html,
	body {
		background-color: $uni-app-bg-color;
	}

	.page-style {
		margin: 20rpx auto 0;
		width: calc(100vw - 40rpx);
		/* #ifdef H5 */
		min-height: calc(100vh - 210rpx);
		/* #endif */
		/* #ifdef APP-PLUS */
		min-height: calc(100vh - 40rpx);
		/* #endif */
		background-color: $uni-page-bg-color;
	}
</style>